import request from '@/utils/request'
// 获取商品搜索结果
export const getProList = (obj) => {
  return request.get('/goods/list', {
    params: {
      sortType: obj.sortType, // 搜索类型
      sortPrice: obj.sortPrice,
      categoryId: obj.categoryId,
      goodsName: obj.goodsName,
      page: obj.page
    }
  })
}
// 获取商品详情
export const getProDetail = (proId) => {
  return request.get('/goods/detail', {
    params: {
      goodsId: proId
    }
  })
}

// 获取商品评论
export const getProComments = (goodsId, limit) => {
  return request.get('/comment/listRows', {
    params: {
      goodsId,
      limit // 获取评论数量
    }
  })
}
